<template>
	<view class="agreement_text">
		<rich-text :nodes="detail[index].value"></rich-text>
	</view>
</template>

<script>
	import { baseInfo } from '@/api/mine.js'
	export default {
		data() {
			return {
				index: '',
				detail: ''
			};
		},
		onLoad(options) {
			if (options.index) {
				this.index = options.index
			}
			this.baseInfoFun()
		},
		onShareAppMessage(res) { //发送给朋友
			return {
				title: '小程序分享',
				imageUrl: '',
			}
		},
		methods: {
			baseInfoFun() {
				baseInfo().then(res => {
					if (res.code == 1) {
						this.detail = res.data
					}
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
.agreement_text {
	padding: 30rpx;
}
</style>
